package io.renren.modules.sp.dao;

import io.renren.common.dao.BaseDao;
import io.renren.modules.sp.dto.SpTicketDTO;
import io.renren.modules.sp.entity.SpTicketEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import cn.hutool.db.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import java.util.List;
import java.util.Map;

/**
* 参赛证表
*
* @author whc 15953295779@126.com
* @since 3.0 2023-04-21
*/
@Mapper
public interface SpTicketDao extends BaseDao<SpTicketEntity> {
    IPage<SpTicketEntity> selectPageVo(Page page, @Param(Constants.WRAPPER) QueryWrapper<SpTicketDTO>  wrapper);

    /**
     * 往数据库插入一个用户并返回该用户id
     * @param spTicketEntity
     */
    void insertTicket(SpTicketEntity spTicketEntity);

    List<Map<String,Object>> queryTicket(@Param(Constants.WRAPPER) Map<String, Object> params);


    IPage<Map<String,Object>> queryTicketBy(com.baomidou.mybatisplus.extension.plugins.pagination.Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

}